package xinxin.com.BuilderPattern.Person.PersonDetail;

import xinxin.com.BuilderPattern.Person.PersonBuilder;

import javax.swing.*;
import java.awt.*;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/3/25 17:29
 */
public class PersonFatBuilder extends PersonBuilder {

    public PersonFatBuilder(Color color) {
        super(color);
    }

    @Override
    public void BuildHead(Graphics graphics) {
        graphics.drawOval(50, 20, 30, 30);// 头部（画圆形）
    }

    @Override
    public void BuildBody(Graphics graphics) {
        graphics.drawOval(45, 50, 40, 50);// 身体（画矩形）
    }

    @Override
    public void BuildArmLeft(Graphics graphics) {
        graphics.drawLine(50, 50, 30, 100);// 左臂（画直线）
    }

    @Override
    public void BuildArmRight(Graphics graphics) {
        graphics.drawLine(80, 50, 100, 100);// 右臂（画直线）
    }

    @Override
    public void BuildLegLeft(Graphics graphics) {
        graphics.drawLine(60, 100, 45, 150);// 左腿（画直线）
    }

    @Override
    public void BuildLegRight(Graphics graphics) {
        graphics.drawLine(70, 100, 85, 150);// 右腿（画直线）
    }
}
